package eSchool.BL;

import eSchool.DataLayer.DAOFactory;
import eSchool.DataLayer.IDisciplinaDAO;

public class Disciplinas extends BasicListObject<Disciplina> implements IDadosEntidade {

    Disciplina dscp = new Disciplina();
    
    public Disciplinas(){
    
    }
    
    public Disciplinas(CriteriosPesquisa criterios) throws Exception{
        this.leDados(criterios);
    }
    
    
    public String[][] toStringArray() {
        return null;
    }

    @Override
    public int getColumnCount() {
        return dscp.getColumnCount();
    }

    @Override
    public String getColumnName(int columnIndex) {
        return dscp.getColumnName(columnIndex);
    }

    @Override
    public Class<?> getColumnClass(int columnIndex) {
        return dscp.getColumnClass(columnIndex);
    }

    public Object getValueAt(int rowIndex, int columnIndex){
           return this.get(rowIndex).getValueAt(0, columnIndex);
    } 

    public void setValueAt(Object aValue, int rowIndex, int columnIndex){
            this.get(rowIndex).setValueAt(aValue, 0, columnIndex);
    }

    
    @Override
    public void leDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
    
    public void leDados(CriteriosPesquisa criterios) throws Exception {
         DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.ACCESS);
         IDisciplinaDAO disciplinaDAO = factory.getDisciplinaDAO();           
         disciplinaDAO.selectDisciplinaTO(this, criterios);
    }


    @Override
    public void gravaDados() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
